home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Updaters / WhiteCap 3.0.4 / WhiteCap Source.sit / WhiteCap Source / Common / math / Headers / Plane.h < prev    next >
MacBinary  |  1999-07-13  |  1.8 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Jul 13 21:53:58 1999, modified Tue Jul 13 21:53:58 1999, creator 'CWIE', type ASCII, 1065 bytes "Plane.h" , at 0x4a9 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 50 6c 61 6e 65 2e | 68 00 00 00 00 00 00 00 |..Plane.|h.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 04 29 00 | 00 01 9a b3 b1 9e 36 b3 |......).|......6.|
|00000060| b1 9e 36 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..6.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 b8 1e 00 00 |........|........|
|00000080| 0d 23 70 72 61 67 6d 61 | 20 6f 6e 63 65 0d 0d 23 |.#pragma| once..#|
|00000090| 69 6e 63 6c 75 64 65 20 | 22 56 33 2e 68 22 0d 0d |include |"V3.h"..|
|000000a0| 0d 63 6c 61 73 73 20 50 | 6c 61 6e 65 20 3a 20 70 |.class P|lane : p|
|000000b0| 75 62 6c 69 63 20 56 33 | 20 7b 0d 0d 09 70 75 62 |ublic V3| {...pub|
|000000c0| 6c 69 63 3a 09 0d 09 09 | 2f 2f 09 52 65 74 75 72 |lic:....|//.Retur|
|000000d0| 6e 73 20 31 20 69 66 20 | 69 6e 50 74 20 69 73 20 |ns 1 if |inPt is |
|000000e0| 6f 6e 20 73 61 6d 65 20 | 73 69 64 65 20 6f 66 20 |on same |side of |
|000000f0| 74 68 69 73 20 70 6c 61 | 6e 65 20 61 73 20 69 6e |this pla|ne as in|
|00000100| 66 69 6e 69 74 79 0d 09 | 09 2f 2f 09 52 65 74 75 |finity..|.//.Retu|
|00000110| 72 6e 73 20 30 20 69 66 | 20 69 6e 50 74 20 69 73 |rns 0 if| inPt is|
|00000120| 20 6f 6e 20 74 68 69 73 | 20 70 6c 61 6e 65 0d 09 | on this| plane..|
|00000130| 09 2f 2f 09 52 65 74 75 | 72 6e 73 20 2d 31 20 69 |.//.Retu|rns -1 i|
|00000140| 66 20 69 6e 50 74 20 69 | 73 20 6f 6e 20 74 68 65 |f inPt i|s on the|
|00000150| 20 73 61 6d 65 20 73 69 | 64 65 20 61 73 20 28 30 | same si|de as (0|
|00000160| 2c 30 2c 30 29 0d 09 09 | 2f 2f 69 6e 74 09 09 09 |,0,0)...|//int...|
|00000170| 09 09 4f 6e 50 6c 61 6e | 65 28 20 63 6f 6e 73 74 |..OnPlan|e( const|
|00000180| 20 56 65 63 74 6f 72 26 | 20 69 6e 50 74 20 29 3b | Vector&| inPt );|
|00000190| 0d 09 09 0d 09 09 2f 2f | 09 52 65 74 75 72 6e 73 |......//|.Returns|
|000001a0| 20 6c 65 66 74 20 68 61 | 6e 64 20 73 69 64 65 20 | left ha|nd side |
|000001b0| 6f 66 20 65 71 75 61 74 | 69 6f 6e 2e 20 20 69 65 |of equat|ion. ie|
|000001c0| 2c 20 74 68 65 20 63 6c | 6f 73 65 72 20 69 74 20 |, the cl|oser it |
|000001d0| 69 73 20 74 6f 20 7a 65 | 72 6f 2c 20 74 68 65 20 |is to ze|ro, the |
|000001e0| 63 6c 6f 73 65 72 0d 09 | 09 2f 2f 09 69 6e 50 74 |closer..|.//.inPt|
|000001f0| 20 69 73 20 74 6f 20 62 | 65 69 6e 67 20 6f 6e 20 | is to b|eing on |
|00000200| 74 68 69 73 20 70 6c 61 | 6e 65 2e 20 20 49 74 27 |this pla|ne. It'|
|00000210| 73 3a 20 20 28 74 68 69 | 73 2e 44 6f 74 28 20 69 |s: (thi|s.Dot( i|
|00000220| 6e 50 74 20 29 20 2d 20 | 6d 44 29 0d 09 09 50 46 |nPt ) - |mD)...PF|
|00000230| 6c 6f 61 74 09 09 09 09 | 43 68 65 63 6b 5a 65 72 |loat....|CheckZer|
|00000240| 6f 28 20 63 6f 6e 73 74 | 20 56 33 26 20 69 6e 50 |o( const| V3& inP|
|00000250| 74 20 29 20 63 6f 6e 73 | 74 3b 0d 09 09 0d 09 09 |t ) cons|t;......|
|00000260| 2f 2f 09 41 73 73 69 67 | 6e 73 20 74 68 69 73 20 |//.Assig|ns this |
|00000270| 70 6c 61 6e 65 20 73 6f | 20 74 68 61 74 20 61 6c |plane so| that al|
|00000280| 6c 20 74 68 72 65 65 20 | 70 74 73 20 6c 69 65 20 |l three |pts lie |
|00000290| 6f 6e 20 74 68 69 73 20 | 70 6c 61 6e 65 0d 09 09 |on this |plane...|
|000002a0| 76 6f 69 64 09 09 09 09 | 73 65 74 28 20 63 6f 6e |void....|set( con|
|000002b0| 73 74 20 56 33 26 20 69 | 6e 50 74 31 2c 20 63 6f |st V3& i|nPt1, co|
|000002c0| 6e 73 74 20 56 33 26 20 | 69 6e 50 74 32 2c 20 63 |nst V3& |inPt2, c|
|000002d0| 6f 6e 73 74 20 56 33 26 | 20 69 6e 50 74 33 20 29 |onst V3&| inPt3 )|
|000002e0| 3b 0d 09 09 0d 09 09 2f | 2f 09 41 73 73 69 67 6e |;....../|/.Assign|
|000002f0| 73 20 74 68 69 73 20 70 | 6c 61 6e 65 20 77 69 74 |s this p|lane wit|
|00000300| 68 20 61 20 6e 6f 72 6d | 61 6c 20 70 61 72 65 6c |h a norm|al parel|
|00000310| 6c 65 6c 20 74 6f 20 69 | 6e 4e 6f 72 6d 61 6c 20 |lel to i|nNormal |
|00000320| 61 6e 64 20 73 6f 20 74 | 68 61 74 20 69 74 20 70 |and so t|hat it p|
|00000330| 61 73 73 65 73 20 74 68 | 72 75 20 74 68 65 20 70 |asses th|ru the p|
|00000340| 74 3a 20 69 6e 44 20 2a | 20 75 6e 69 74 28 69 6e |t: inD *| unit(in|
|00000350| 4e 6f 72 6d 61 6c 29 0d | 09 09 76 6f 69 64 09 09 |Normal).|..void..|
|00000360| 09 09 73 65 74 28 20 63 | 6f 6e 73 74 20 56 33 26 |..set( c|onst V3&|
|00000370| 20 69 6e 4e 6f 72 6d 61 | 6c 2c 20 50 46 6c 6f 61 | inNorma|l, PFloa|
|00000380| 74 20 69 6e 44 20 29 3b | 0d 09 09 76 6f 69 64 09 |t inD );|...void.|
|00000390| 09 09 09 73 65 74 28 20 | 50 46 6c 6f 61 74 20 69 |...set( |PFloat i|
|000003a0| 6e 58 2c 20 50 46 6c 6f | 61 74 20 69 6e 59 2c 20 |nX, PFlo|at inY, |
|000003b0| 50 46 6c 6f 61 74 20 69 | 6e 5a 2c 20 50 46 6c 6f |PFloat i|nZ, PFlo|
|000003c0| 61 74 20 69 6e 44 20 29 | 3b 0d 0d 09 09 2f 2f 20 |at inD )|;....// |
|000003d0| 46 69 6e 64 20 69 6e 74 | 65 72 73 65 63 74 69 6e |Find int|ersectin|
|000003e0| 67 20 6c 69 6e 65 20 6f | 66 20 74 68 69 73 20 70 |g line o|f this p|
|000003f0| 6c 61 6e 65 20 61 6e 64 | 20 61 6e 6f 74 68 65 72 |lane and| another|
|00000400| 20 70 6c 61 6e 65 0d 09 | 09 76 6f 69 64 09 09 09 | plane..|.void...|
|00000410| 09 69 6e 74 65 72 73 65 | 63 74 28 20 63 6f 6e 73 |.interse|ct( cons|
|00000420| 74 20 50 6c 61 6e 65 26 | 20 69 6e 50 6c 2c 20 56 |t Plane&| inPl, V|
|00000430| 33 26 20 6f 75 74 44 69 | 72 2c 20 56 33 26 20 6f |3& outDi|r, V3& o|
|00000440| 75 74 50 6f 73 20 29 3b | 0d 0d 0d 0d 09 09 2f 2f |utPos );|......//|
|00000450| 20 45 71 3a 20 6d 58 20 | 78 20 2b 20 6d 59 20 79 | Eq: mX |x + mY y|
|00000460| 20 2b 20 6d 5a 20 7a 20 | 3d 20 6d 44 0d 09 09 2f | + mZ z |= mD.../|
|00000470| 2f 20 43 6f 6e 76 65 6e | 74 69 6f 6e 3a 20 6d 44 |/ Conven|tion: mD|
|00000480| 20 69 73 20 2a 61 6c 77 | 61 79 73 2a 20 20 70 6f | is *alw|ays* po|
|00000490| 73 69 74 69 76 65 0d 09 | 09 50 46 6c 6f 61 74 09 |sitive..|.PFloat.|
|000004a0| 6d 44 3b 0d 7d 3b 0d 0d | 0d 00 00 00 00 00 00 00 |mD;.};..|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000510| cf 00 e2 d2 75 ae 9f e5 | e2 58 24 99 99 69 b0 74 |....u...|.X$..i.t|
|00000520| 06 88 e1 28 1e 5d 22 36 | 48 16 23 2b 04 10 3c d3 |...(.]"6|H.#+..<.|
|00000530| 07 50 6c 61 6e 65 2e 68 | 72 6f 6e 2e 68 68 70 70 |.Plane.h|ron.hhpp|
|00000540| 61 73 65 2e 63 70 70 61 | 74 6f 72 2e 65 78 65 33 |ase.cppa|tor.exe3|
|00000550| 00 36 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |.6PartSI|T!......|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 b2 c4 42 c9 00 00 | 00 00 00 00 01 9a ff f8 |....B...|........|
|00000580| bb f5 bf b0 00 17 23 8a | d3 3f 2b 4a b1 d1 b4 35 |......#.|.?+J...5|
|00000590| 30 59 c7 81 f1 4c 86 5e | 12 0d 4a f4 c0 3e 57 06 |0Y...L.^|..J..>W.|
|000005a0| d6 6c ed 4d 1f 18 55 e8 | 22 85 b4 28 92 1e 27 3f |.l.M..U.|"..(..'?|
|000005b0| 48 c5 1b 8f 9d 07 a5 f3 | 6d ad f6 46 cc ab d2 23 |H.......|m..F...#|
|000005c0| 00 5b f3 82 11 87 b7 cc | b0 48 e3 94 d1 db 82 b8 |.[......|.H......|
|000005d0| 82 e1 a5 f6 53 20 47 e2 | 4c af 6a 9c de 3f 5b 16 |....S G.|L.j..?[.|
|000005e0| 54 86 9a b1 77 0c ff fb | 92 54 ce 00 03 fd 55 53 |T...w...|.T....US|
|000005f0| 13 2c 32 f6 44 23 9a 67 | 61 e9 4a ce bd 09 50 4c |.,2.D#.g|a.J...PL|
|00000600| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 03 | 00 04 00 94 00 1c 02 4c |........|.......L|
|00000630| 02 72 00 94 00 1c 02 4c | 02 72 b3 b1 57 e6 00 00 |.r.....L|.r..W...|
|00000640| 02 1d 00 00 02 1d 00 00 | 00 0e 01 00 00 00 00 04 |........|........|
|00000650| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000660| 00 00 00 46 05 c8 4f 74 | 17 82 00 00 00 1c 00 46 |...F..Ot|.......F|
|00000670| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000680| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000690| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+